#!/usr/bin/env python
import dpdata
import matplotlib.pyplot as plt
import numpy as np

training_systems = dpdata.LabeledSystem("/home/zxg/be-cu_dp_course/dpgen/run/deepmd_file/Be16_hcp0.96_1.04/deepmd", fmt = "deepmd/npy")  # 得到训练数据点
predict = training_systems.predict("/home/zxg/be-cu_dp_course/dpgen/run/iter.000000/00.train/000/frozen_model.pb")  # 得到预测数据点

plt.scatter(training_systems["energies"], predict["energies"])

x_range = np.linspace(plt.xlim()[0], plt.xlim()[1])

plt.plot(x_range, x_range, "r--", linewidth = 0.25)
plt.xlabel("DFT energy (eV/atom)")  # 设置 x 轴标题
plt.ylabel("DP energy (eV/atom)")  # 设置 y 轴标题
plt.savefig('inter00.png')